package com.example.as_sum.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.widget.TextView;

import com.example.as_sum.R;
import com.example.as_sum.application.AppApplication;
import com.example.as_sum.util.Log;
import com.example.as_sum.util.SharePerferenceUtil;

import java.util.List;

public class PersonInfoActivity extends BaseActivity implements View.OnClickListener{

    private TextView tv_out,person_tv1;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initTitle("个人中心");

        AppApplication.aContext.getAllActivity();
    }

    @Override
    public int getContentId() {
        return R.layout.activity_person_info;
    }

    @Override
    public void initView() {
        tv_out=(TextView)this.findViewById(R.id.persion_logout);
        person_tv1=(TextView)this.findViewById(R.id.person_tv1);
    }

    @Override
    public void addListener() {
        tv_out.setOnClickListener(this);
        person_tv1.setOnClickListener(this);
    }

    @Override
    public void loadData() {

    }

    @Override
    public Handler getHandler() {
        return null;
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.persion_logout:
                SharePerferenceUtil.putMobile(this,"");
                AppApplication.aContext.safetyLogout(this,true);
                break;
            case R.id.person_tv1:
                Intent intent=new Intent(this,SafetyCenterActivity.class);
                startActivity(intent);
                break;
        }
    }
}
